﻿namespace NJQuery.JGrowlExtension {
	using System;
	using System.Drawing;
	using System.Web;
	using System.Web.UI;
	using System.Text;
	using System.Collections.Generic;
	using System.Globalization;
	using System.Diagnostics.CodeAnalysis;

	/// <summary>
	/// Provides extended instance methods for objects that cannot otherwise have them defined.
	/// </summary>
	public static class Extensions {

		#region Static Methods: ToClientSource() methods

		/// <summary>
		/// Returns a literal JavaScript value used to represent the server value on the client.
		/// </summary>
		/// <param name="value">The <see cref="JGrowlGlue"/> value being extended.</param>
		/// <returns>The client script value.</returns>
		public static string ToClientSource(this JGrowlGlue value) {
			return GetEnumSource(value);
		}

		private static string GetEnumSource<T>(T value) where T : struct {
			return ScriptBuilder.GetCamelCaseValue(value).ToClientSource();
		}

		#endregion

	}

}